/*
* Conditions Of Use
*
* This software was developed by employees of the Sigmatrix(Beijing) Corporation.
* This software is provided by sigmatrix as a service and is expressly
* provided "AS IS."  Sigmatrix MAKES NO WARRANTY OF ANY KIND, EXPRESS, IMPLIED
* OR STATUTORY, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTY OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT
* AND DATA ACCURACY.  Sigmatrix does not warrant or make any representations
* regarding the use of the software or the results thereof, including but
* not limited to the correctness, accuracy, reliability or usefulness of
* the software.
*
* Permission to use this software is contingent upon your acceptance
* of the terms of this agreement.
*
*/
package com.sigmatrix.h5.dao;

import java.util.List;

import com.sigmatrix.h5.dao.impl.common.BaseDao;
import com.sigmatrix.h5.dto.OutStorageDetailData;
import com.sigmatrix.h5.entity.OutStorageDetail;
import com.sigmatrix.h5.exception.DaoException;

/**
 *@ClassName: OutStorageDetailDao
 *@Description: 出库单详情数据库操作接口
 *@author youjun
 *@date 2017-06-24 17:35:21
 */
public interface OutStorageDetailDao extends BaseDao<OutStorageDetail> {

	/**
	 *@Title: findById
	 *@Description: 根据主键查找出库单详情
	 *@return OutStorageDetail
	 *@author youjun
	 *@date 2017-06-24 17:35:21
	 *@param id
	 *@param enterpriseCode
	 *@return
	 *@throws DaoException 
	 */
	OutStorageDetail findById(final Integer id, final String enterpriseCode) throws DaoException;
	
	/**
	 *@Title: save
	 *@Description: 保存出库单详情
	 *@return int
	 *@author youjun
	 *@date 2017-06-24 17:35:21
	 *@param outStorageDetail
	 *@param enterpriseCode
	 *@return
	 *@throws DaoException 
	 */
	int save(final OutStorageDetail outStorageDetail, final String enterpriseCode) throws DaoException;

	/**
	 *@Title: update
	 *@Description: 更新出库单详情
	 *@return int
	 *@author youjun
	 *@date 2017-06-24 17:35:21
	 *@param outStorageDetail
	 *@param enterpriseCode
	 *@return
	 *@throws DaoException 
	 */
	int update(final OutStorageDetail outStorageDetail, final String enterpriseCode) throws DaoException;
	
	/**
	 *@Title: findListByCondition
	 *@Description: 根据条件查找出库单详情列表
	 *@return List<OutStorageDetail>
	 *@author youjun
	 *@date 2017-06-24 17:35:21
	 *@param outStorageDetail
	 *@param enterpriseCode
	 *@return
	 *@throws DaoException
	 */
	List<OutStorageDetail> findListByCondition(final OutStorageDetail outStorageDetail, final String enterpriseCode) throws DaoException;

	/**
	 *@Title: findPartColumnListByCondition
	 *@Description: TODO()
	 *@return List<OutStorageDetailData>
	 *@author youjun
	 *@date 2017年6月26日 下午1:53:30
	 *@param outStorageDetail
	 *@param enterpriseCode
	 * @throws DaoException 
	 */
	List<OutStorageDetailData> findPartColumnListByCondition(final OutStorageDetail outStorageDetail, final String enterpriseCode) throws DaoException;

	/**
	 *@Title: batchSave
	 *@Description: 批量保存出库单详情
	 *@return int
	 *@author youjun
	 *@date 2017年7月6日 下午1:51:06
	 *@param detailList
	 *@param enterpriseCode
	 * @throws DaoException 
	 */
	int batchSave(final List<OutStorageDetail> detailList, final String enterpriseCode) throws DaoException;

	/**
	 *@Title: closeByOutStorageId
	 *@Description: TODO()
	 *@return int
	 *@author youjun
	 *@date 2017年8月23日 下午5:03:54
	 *@param outStorageId
	 *@param canCloseStatusList
	 *@param enterpriseCode
	 *@return
	 *@throws DaoException
	 */
	int closeByOutStorageId(long outStorageId, List<Integer> canCloseStatusList, String enterpriseCode)
			throws DaoException;
}
